<?php

namespace App\Models\GameServer;

use Illuminate\Database\Eloquent\Model;

class ExchangeRecord extends Model
{
    protected $table = 'user_gift_mall_buy_record';
    protected $primaryKey = 'id';
    protected $connection = 'game_server';

    //获取用户信息
    public function userInfo()
    {
        return $this->belongsTo('App\Models\GameServer\UserInfo', 'account_id', 'id');
    }

    //获取礼品信息
    public function gift()
    {
        return $this->belongsTo('App\Models\GameServer\Gift', 'item_id', 'id');
    }
}
